package com.myapp.api.entity;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.util.Date;

public class StudentCourse extends StudentCourseKey {
    @NotNull(message = "课程成绩不能为空")
    @Digits(integer = 3, fraction = 1, message = "非法的课程成绩")
    @DecimalMax(value = "100.0",message = "课程成绩最大值 100.0")
    @DecimalMin(value = "0.0",message = "课程成绩最小值 0.0")
    private Double score;

    @NotNull(message = "课程补考成绩不能为空")
    @Digits(integer = 3, fraction = 1, message = "非法的补考课程成绩")
    @DecimalMax(value = "100.0",message = "课程补考成绩最大值 100.0")
    @DecimalMin(value = "0.0",message = "课程补考成绩最小值 0.0")
    private Double secondscore;
    private Date createtime;

    private Date updatetime;

    public Double getScore() {
        return score;
    }

    public void setScore(Double score) {
        this.score = score;
    }

    public Double getSecondscore() {
        return secondscore;
    }

    public void setSecondscore(Double secondscore) {
        this.secondscore = secondscore;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }
}